package work.mediway.mdm.biz.entity.hierarchy;

import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.mediway.hos.common.annotation.Excel;

import org.apache.ibatis.type.JdbcType;

import java.io.Serializable;
import java.util.List;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

@ApiModel(value = "人员基本信息表")
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "HOS_Person", autoResultMap = true)
public class HosPerson implements Serializable {

    //需要当为空字符串时设置为null的字段
    public static String[] CHECK_ATTR_ARRAY = new String[]{
            "paGenderCode", "paNationalityCode", "paNationCode", "paEducationCode", "paOccupationCode",
            "paMarriedCode", "paReligionCode", "paNPCountryCode", "paNPPROVCode", "paNPCITYCode",
            "paNPDISTRCode", "paAddrCountryCode", "paAddrPROVCode", "paAddrCITYCode", "paAddrDISTRCode",
            "paBirthDate", "paBirthTime"
    };

    @TableId(
            value = "PA_PersonID",
            type = IdType.ASSIGN_ID
    )
    @ApiModelProperty(value = "", required = true)
    @Excel(name = "唯一标识码")
    private String paPersonID;

    @TableField(
            value = "PA_Name",
            insertStrategy = FieldStrategy.NOT_EMPTY,
            updateStrategy = FieldStrategy.IGNORED,
            whereStrategy = FieldStrategy.NOT_EMPTY
    )
    @ApiModelProperty(value = "姓名", required = true)
    @Excel(name = "姓名")
    private String paName;

    @TableField(
            value = "PA_GenderCode",
            insertStrategy = FieldStrategy.NOT_EMPTY,
            updateStrategy = FieldStrategy.IGNORED,
            whereStrategy = FieldStrategy.NOT_EMPTY
    )
    @ApiModelProperty(value = "性别代码")
    @Excel(name = "性别代码")
    private String paGenderCode;

    @TableField(
            exist = false,
            insertStrategy = FieldStrategy.NEVER,
            updateStrategy = FieldStrategy.NEVER,
            whereStrategy = FieldStrategy.NEVER
    )
    @ApiModelProperty(value = "性别描述")
    private String paGenderDesc;

    @TableField(
            value = "PA_BirthDate",
            jdbcType = JdbcType.DATE,
            insertStrategy = FieldStrategy.NOT_EMPTY,
            updateStrategy = FieldStrategy.IGNORED,
            whereStrategy = FieldStrategy.NOT_EMPTY
    )
    @ApiModelProperty(value = "出生日期（YYYY-MM-DD）")
    @Excel(name = "出生日期")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private String paBirthDate;

    @TableField(
            value = "PA_BirthTime",
            jdbcType = JdbcType.TIME,
            insertStrategy = FieldStrategy.NOT_EMPTY,
            updateStrategy = FieldStrategy.IGNORED,
            whereStrategy = FieldStrategy.NOT_EMPTY
    )
    @ApiModelProperty(value = "出生时间（HH:mm:ss）")
    @Excel(name = "出生时间")
    @JsonFormat(pattern = "HH:mm:ss")
    private String paBirthTime;

    @TableField(
            value = "PA_NationalityCode",
            insertStrategy = FieldStrategy.NOT_EMPTY,
            updateStrategy = FieldStrategy.IGNORED,
            whereStrategy = FieldStrategy.NOT_EMPTY
    )
    @ApiModelProperty(value = "国籍")
    @Excel(name = "国籍")
    private String paNationalityCode;

    @TableField(
            exist = false,
            insertStrategy = FieldStrategy.NEVER,
            updateStrategy = FieldStrategy.NEVER,
            whereStrategy = FieldStrategy.NEVER
    )
    @ApiModelProperty(value = "国籍描述")
    private String paNationalityDesc;

    @TableField(
            value = "PA_IdentityID",
            insertStrategy = FieldStrategy.NOT_EMPTY,
            updateStrategy = FieldStrategy.IGNORED,
            whereStrategy = FieldStrategy.NOT_EMPTY
    )
    @ApiModelProperty(value = "身份证号")
    @Excel(name = "身份证号")
    private String paIdentityID;

    @TableField(
            value = "PA_IdentityType",
            insertStrategy = FieldStrategy.NOT_EMPTY,
            updateStrategy = FieldStrategy.IGNORED,
            whereStrategy = FieldStrategy.NOT_EMPTY
    )
    @ApiModelProperty(value = "身份证件类型")
    @Excel(name = "身份证件类型")
    private String paIdentityType;

    @TableField(
            value = "PA_NationCode",
            insertStrategy = FieldStrategy.NOT_EMPTY,
            updateStrategy = FieldStrategy.IGNORED,
            whereStrategy = FieldStrategy.NOT_EMPTY
    )
    @ApiModelProperty(value = "民族代码")
    @Excel(name = "民族代码")
    private String paNationCode;

    @TableField(
            exist = false,
            insertStrategy = FieldStrategy.NEVER,
            updateStrategy = FieldStrategy.NEVER,
            whereStrategy = FieldStrategy.NEVER
    )
    @ApiModelProperty(value = "民族描述")
    private String paNationDesc;

    @TableField(
            value = "PA_EducationCode",
            insertStrategy = FieldStrategy.NOT_EMPTY,
            updateStrategy = FieldStrategy.IGNORED,
            whereStrategy = FieldStrategy.NOT_EMPTY
    )
    @ApiModelProperty(value = "学历代码")
    @Excel(name = "学历代码")
    private String paEducationCode;

    @TableField(
            exist = false,
            insertStrategy = FieldStrategy.NEVER,
            updateStrategy = FieldStrategy.NEVER,
            whereStrategy = FieldStrategy.NEVER
    )
    @ApiModelProperty(value = "学历描述")
    private String paEducationDesc;

    @TableField(
            value = "PA_OccupationCode",
            insertStrategy = FieldStrategy.NOT_EMPTY,
            updateStrategy = FieldStrategy.IGNORED,
            whereStrategy = FieldStrategy.NOT_EMPTY
    )
    @ApiModelProperty(value = "职业代码")
    @Excel(name = "职业代码")
    private String paOccupationCode;

    @TableField(
            exist = false,
            insertStrategy = FieldStrategy.NEVER,
            updateStrategy = FieldStrategy.NEVER,
            whereStrategy = FieldStrategy.NEVER
    )
    @ApiModelProperty(value = "职业描述")
    private String paOccupationDesc;

    @TableField(
            value = "PA_MarriedCode",
            insertStrategy = FieldStrategy.NOT_EMPTY,
            updateStrategy = FieldStrategy.IGNORED,
            whereStrategy = FieldStrategy.NOT_EMPTY
    )
    @ApiModelProperty(value = "婚姻状态")
    @Excel(name = "婚姻状态")
    private String paMarriedCode;

    @TableField(
            exist = false,
            insertStrategy = FieldStrategy.NEVER,
            updateStrategy = FieldStrategy.NEVER,
            whereStrategy = FieldStrategy.NEVER
    )
    @ApiModelProperty(value = "婚姻描述")
    private String paMarriedDesc;

    @TableField(
            value = "PA_ReligionCode",
            insertStrategy = FieldStrategy.NOT_EMPTY,
            updateStrategy = FieldStrategy.IGNORED,
            whereStrategy = FieldStrategy.NOT_EMPTY
    )
    @ApiModelProperty(value = "宗教")
    @Excel(name = "宗教")
    private String paReligionCode;

    @TableField(
            exist = false,
            insertStrategy = FieldStrategy.NEVER,
            updateStrategy = FieldStrategy.NEVER,
            whereStrategy = FieldStrategy.NEVER
    )
    @ApiModelProperty(value = "宗教描述")
    private String paReligionDesc;

    @TableField(
            value = "PA_NPCountryCode",
            insertStrategy = FieldStrategy.NOT_EMPTY,
            updateStrategy = FieldStrategy.IGNORED,
            whereStrategy = FieldStrategy.NOT_EMPTY
    )
    @ApiModelProperty(value = "籍贯（国家）")
    @Excel(name = "籍贯（国家）")
    private String paNPCountryCode;

    @TableField(
            exist = false,
            insertStrategy = FieldStrategy.NEVER,
            updateStrategy = FieldStrategy.NEVER,
            whereStrategy = FieldStrategy.NEVER
    )
    @ApiModelProperty(value = "籍贯（国家）描述")
    private String paNPCountryDesc;

    @TableField(
            value = "PA_NPPROVCode",
            insertStrategy = FieldStrategy.NOT_EMPTY,
            updateStrategy = FieldStrategy.IGNORED,
            whereStrategy = FieldStrategy.NOT_EMPTY
    )
    @ApiModelProperty(value = "籍贯（省）")
    @Excel(name = "籍贯（省）")
    private String paNPPROVCode;

    @TableField(
            exist = false,
            insertStrategy = FieldStrategy.NEVER,
            updateStrategy = FieldStrategy.NEVER,
            whereStrategy = FieldStrategy.NEVER
    )
    @ApiModelProperty(value = "籍贯（省）描述")
    private String paNPPROVDesc;


    @TableField(
            value = "PA_NPCITYCode",
            insertStrategy = FieldStrategy.NOT_EMPTY,
            updateStrategy = FieldStrategy.IGNORED,
            whereStrategy = FieldStrategy.NOT_EMPTY
    )
    @ApiModelProperty(value = "籍贯（市）")
    @Excel(name = "籍贯（市）")
    private String paNPCITYCode;

    @TableField(
            exist = false,
            insertStrategy = FieldStrategy.NEVER,
            updateStrategy = FieldStrategy.NEVER,
            whereStrategy = FieldStrategy.NEVER
    )
    @ApiModelProperty(value = "籍贯（市）描述")
    private String paNPCITYDesc;

    @TableField(
            value = "PA_NPDISTRCode",
            insertStrategy = FieldStrategy.NOT_EMPTY,
            updateStrategy = FieldStrategy.IGNORED,
            whereStrategy = FieldStrategy.NOT_EMPTY
    )
    @ApiModelProperty(value = "籍贯（县区）")
    @Excel(name = "籍贯（县区）")
    private String paNPDISTRCode;

    @TableField(
            exist = false,
            insertStrategy = FieldStrategy.NEVER,
            updateStrategy = FieldStrategy.NEVER,
            whereStrategy = FieldStrategy.NEVER
    )
    @ApiModelProperty(value = "籍贯（县区）描述")
    private String paNPDISTRDesc;

    @TableField(
            value = "PA_AddrCountryCode",
            insertStrategy = FieldStrategy.NOT_EMPTY,
            updateStrategy = FieldStrategy.IGNORED,
            whereStrategy = FieldStrategy.NOT_EMPTY
    )
    @ApiModelProperty(value = "现住址（国家）")
    @Excel(name = "现住址（国家）")
    private String paAddrCountryCode;

    @TableField(
            exist = false,
            insertStrategy = FieldStrategy.NEVER,
            updateStrategy = FieldStrategy.NEVER,
            whereStrategy = FieldStrategy.NEVER
    )
    @ApiModelProperty(value = "现住址（国家）描述")
    private String paAddrCountryDesc;


    @TableField(
            value = "PA_AddrPROVCode",
            insertStrategy = FieldStrategy.NOT_EMPTY,
            updateStrategy = FieldStrategy.IGNORED,
            whereStrategy = FieldStrategy.NOT_EMPTY
    )
    @ApiModelProperty(value = "现住址（省）")
    @Excel(name = "现住址（省）")
    private String paAddrPROVCode;

    @TableField(
            exist = false,
            insertStrategy = FieldStrategy.NEVER,
            updateStrategy = FieldStrategy.NEVER,
            whereStrategy = FieldStrategy.NEVER
    )
    @ApiModelProperty(value = "现住址（省）描述")
    private String paAddrPROVDesc;

    @TableField(
            value = "PA_AddrCITYCode",
            insertStrategy = FieldStrategy.NOT_EMPTY,
            updateStrategy = FieldStrategy.IGNORED,
            whereStrategy = FieldStrategy.NOT_EMPTY
    )
    @ApiModelProperty(value = "现住址（市）")
    @Excel(name = "现住址（市）")
    private String paAddrCITYCode;

    @TableField(
            exist = false,
            insertStrategy = FieldStrategy.NEVER,
            updateStrategy = FieldStrategy.NEVER,
            whereStrategy = FieldStrategy.NEVER
    )
    @ApiModelProperty(value = "现住址（市）描述")
    private String paAddrCITYDesc;

    @TableField(
            value = "PA_AddrDISTRCode",
            insertStrategy = FieldStrategy.NOT_EMPTY,
            updateStrategy = FieldStrategy.IGNORED,
            whereStrategy = FieldStrategy.NOT_EMPTY
    )
    @ApiModelProperty(value = "现住址（县区）")
    @Excel(name = "现住址（县区）")
    private String paAddrDISTRCode;

    @TableField(
            exist = false,
            insertStrategy = FieldStrategy.NEVER,
            updateStrategy = FieldStrategy.NEVER,
            whereStrategy = FieldStrategy.NEVER
    )
    @ApiModelProperty(value = "现住址（县区）描述")
    private String paAddrDISTRDesc;

    @TableField(
            value = "PA_Address",
            insertStrategy = FieldStrategy.NOT_EMPTY,
            updateStrategy = FieldStrategy.IGNORED,
            whereStrategy = FieldStrategy.NOT_EMPTY
    )
    @ApiModelProperty(value = "现住址（详细地址）")
    @Excel(name = "现住址（详细地址）")
    private String paAddress;

    @TableField(
            value = "PA_Photo",
            insertStrategy = FieldStrategy.NOT_EMPTY,
            updateStrategy = FieldStrategy.IGNORED,
            whereStrategy = FieldStrategy.NOT_EMPTY
    )
    @ApiModelProperty(value = "照片")
    @Excel(name = "照片")
    private String paPhoto;

    @TableField(
            value = "PA_Mobile",
            insertStrategy = FieldStrategy.NOT_EMPTY,
            updateStrategy = FieldStrategy.IGNORED,
            whereStrategy = FieldStrategy.NOT_EMPTY
    )
    @ApiModelProperty(value = "手机号码")
    @Excel(name = "手机号码")
    private String paMobile;

    @TableField(
            value = "PA_PersonStatus",
            insertStrategy = FieldStrategy.NOT_EMPTY,
            updateStrategy = FieldStrategy.NOT_NULL,
            whereStrategy = FieldStrategy.NOT_EMPTY
    )
    @ApiModelProperty(value = "状态", required = true)
    @Excel(name = "状态")
    private String paPersonStatus;

    @TableField(
            value = "PA_Activity",
            insertStrategy = FieldStrategy.NOT_EMPTY,
            updateStrategy = FieldStrategy.IGNORED,
            whereStrategy = FieldStrategy.NOT_EMPTY
    )
    @ApiModelProperty(value = "是否有效", required = true)
    @Excel(name = "是否有效")
    private String paActivity;

    @TableField(value = "PA_StartDate",
            insertStrategy = FieldStrategy.NOT_EMPTY,
            updateStrategy = FieldStrategy.NOT_EMPTY,
            whereStrategy = FieldStrategy.NOT_EMPTY, jdbcType = JdbcType.DATE)
    @ApiModelProperty(value = "开始日期")
    @Excel(name = "开始日期")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private String paStartDate;

    @TableField(value = "PA_EndDate",
            insertStrategy = FieldStrategy.NOT_EMPTY,
            updateStrategy = FieldStrategy.NOT_EMPTY,
            whereStrategy = FieldStrategy.NOT_EMPTY, jdbcType = JdbcType.DATE)
    @ApiModelProperty(value = "结束日期")
    @Excel(name = "结束日期")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private String paEndDate;

    @TableField(value = "PA_CreateDate",
            insertStrategy = FieldStrategy.NOT_EMPTY,
            updateStrategy = FieldStrategy.NOT_EMPTY,
            whereStrategy = FieldStrategy.NOT_EMPTY,
            jdbcType = JdbcType.DATE
    )
    @ApiModelProperty(value = "系统创建日期", required = true)
    @Excel(name = "系统创建日期")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private String paCreateDate;

    @TableField(value = "PA_CreateTime", jdbcType = JdbcType.TIME)
    @ApiModelProperty(value = "系统创建时间", required = true)
    @Excel(name = "系统创建时间")
    @JsonFormat(pattern = "HH:mm:ss")
    private String paCreateTime;

    @TableField(value = "PA_CreateUser")
    @ApiModelProperty(value = "系统创建人", required = true)
    @Excel(name = "系统创建人")
    private String paCreateUser;

    @TableField(value = "PA_SeqNo")
    @ApiModelProperty(value = "系统排序号")
    @Excel(name = "系统排序号")
    private Integer paSeqNo;

    @TableField(value = "PA_LastUpdateDate",
            insertStrategy = FieldStrategy.NOT_EMPTY,
            updateStrategy = FieldStrategy.NOT_EMPTY,
            whereStrategy = FieldStrategy.NOT_EMPTY,
            jdbcType = JdbcType.DATE
    )
    @ApiModelProperty(value = "系统最后更新日期", required = true)
    @Excel(name = "系统最后更新日期")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private String paLastUpdateDate;

    @TableField(value = "PA_LastUpdateTime", jdbcType = JdbcType.TIME)
    @ApiModelProperty(value = "系统最后更新时间", required = true)
    @Excel(name = "系统最后更新时间")
    @JsonFormat(pattern = "HH:mm:ss")
    private String paLastUpdateTime;

    @TableField(value = "PA_LastUpdateUser")
    @ApiModelProperty(value = "系统最新更新人", required = true)
    @Excel(name = "系统最新更新人")
    private String paLastUpdateUser;

    @TableField(value = "PA_PYCode")
    @ApiModelProperty(value = "拼音码")
    @Excel(name = "拼音码")
    private String paPYCode;

    @TableField(value = "PA_WBCode")
    @ApiModelProperty(value = "五笔码")
    @Excel(name = "五笔码")
    private String paWBCode;

    @TableField(value = "PA_Mark")
    @ApiModelProperty(value = "备注")
    @Excel(name = "备注")
    private String paMark;

    @ApiModelProperty(value = "图片路径")
    private String imgUrl;

    @TableField(exist = false)
    @ApiModelProperty(value = "籍贯")
    @Excel(name = "籍贯")
    private String nativePlace;

    @TableField(exist = false)
    @ApiModelProperty(value = "现住址")
    @Excel(name = "现住址")
    private String address;

    @TableField(exist = false)
    @ApiModelProperty(value = "职位信息")
    @Excel(name = "职位信息")
    private List<HosPosition> hosPositionList;
}
